<!--搜索单选下拉框-->
<div class="layui-form-item">
    <label class="layui-form-label {$form['extra_class']??''}">
        {if condition="isset($form['extra_attr']) and is_int(strpos($form['extra_attr'], 'required'))"}
        <span class="text-danger">*</span>
        {/if}
        {$form['title']}
    </label>
    <div class="layui-input-block">
        <select
                xm-select="{$form['name']}"
                multiple="multiple"
                lay-search
                id="{$form['name']}"
                name="{$form['name']}"
                {$form['extra_attr']??''}
                xm-select-search=""
        >
        {notempty name="form.options"}
        {foreach $form['options'] as $k => $v}
        <option
                value="{$k}"
                {if condition="isset($form['value']) and  in_array($k, $form['value'])"} selected {/if}
        >{$v|raw}</option>
        {/foreach}
        {/notempty}
        </select>

        {if !empty($form['tip'])}
        <tip class="form-tip">{$form['tip']}</tip>
        {/if}
    </div>
    <script>
        layui.use(['jquery', 'formSelects'], function(){
            var formSelects = layui.formSelects;
        });
    </script>


    <style>
        .xm-select-title {
            height: auto !important;
        }
        .xm-select-parent .xm-select {
            position: relative;
        }
        .xm-select--suffix {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            z-index: -1;
        }
    </style>
</div>